{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>competition_time</th>\n",
       "      <th>净胜球</th>\n",
       "      <th>主客</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018-06-30 22:00:00</td>\n",
       "      <td>0.405893</td>\n",
       "      <td>法国,阿根廷</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2018-07-01 02:00:00</td>\n",
       "      <td>-0.408475</td>\n",
       "      <td>乌拉圭,葡萄牙</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018-07-01 22:00:00</td>\n",
       "      <td>0.660441</td>\n",
       "      <td>西班牙,俄罗斯</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018-07-02 02:00:00</td>\n",
       "      <td>-0.044530</td>\n",
       "      <td>克罗地亚,丹麦</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2018-07-02 22:00:00</td>\n",
       "      <td>0.487959</td>\n",
       "      <td>巴西,墨西哥</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     competition_time       净胜球       主客\n",
       "0 2018-06-30 22:00:00  0.405893   法国,阿根廷\n",
       "1 2018-07-01 02:00:00 -0.408475  乌拉圭,葡萄牙\n",
       "2 2018-07-01 22:00:00  0.660441  西班牙,俄罗斯\n",
       "3 2018-07-02 02:00:00 -0.044530  克罗地亚,丹麦\n",
       "4 2018-07-02 22:00:00  0.487959   巴西,墨西哥"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "result_1 = pd.read_csv(r\"D:\\worldcup\\result_top8.csv\", encoding='gbk')\n",
    "result_2 = pd.read_csv(r\"D:\\worldcup\\result.csv\", encoding='gbk')\n",
    "result_pro = pd.concat([result_1,result_2])\n",
    "\n",
    "result_pro['competition_time'] = pd.to_datetime(result_pro['competition_time'])\n",
    "result_pro = result_pro.reset_index(drop=True)\n",
    "\n",
    "result_pro['主客'] = result_pro['team1'].str.cat(result_pro['team2'], sep=',')\n",
    "\n",
    "result_pro = result_pro.drop(['team1','team2'], axis=1).reset_index(drop=True)\n",
    "result_pro.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>赛事</th>\n",
       "      <th>时间</th>\n",
       "      <th>主队</th>\n",
       "      <th>主</th>\n",
       "      <th>和</th>\n",
       "      <th>客</th>\n",
       "      <th>客队</th>\n",
       "      <th>比分</th>\n",
       "      <th>真实净胜球</th>\n",
       "      <th>主客</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>2.551</td>\n",
       "      <td>2.936</td>\n",
       "      <td>3.273</td>\n",
       "      <td>比利时</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>英格兰,比利时</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>4.170</td>\n",
       "      <td>3.577</td>\n",
       "      <td>1.923</td>\n",
       "      <td>突尼斯</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>巴拿马,突尼斯</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>4.710</td>\n",
       "      <td>3.607</td>\n",
       "      <td>1.809</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>塞内加尔,哥伦比亚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>日本</td>\n",
       "      <td>3.062</td>\n",
       "      <td>3.165</td>\n",
       "      <td>2.577</td>\n",
       "      <td>波兰</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>日本,波兰</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>1.629</td>\n",
       "      <td>3.597</td>\n",
       "      <td>6.872</td>\n",
       "      <td>哥斯达黎加</td>\n",
       "      <td>2:02</td>\n",
       "      <td>0.0</td>\n",
       "      <td>瑞士,哥斯达黎加</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     赛事                  时间    主队      主      和      客     客队    比分  真实净胜球  \\\n",
       "0  世界杯分 2018-06-29 02:00:00   英格兰  2.551  2.936  3.273    比利时  0:01   -1.0   \n",
       "1  世界杯分 2018-06-29 02:00:00   巴拿马  4.170  3.577  1.923    突尼斯  1:02   -1.0   \n",
       "2  世界杯分 2018-06-28 22:00:00  塞内加尔  4.710  3.607  1.809   哥伦比亚  0:01   -1.0   \n",
       "3  世界杯分 2018-06-28 22:00:00    日本  3.062  3.165  2.577     波兰  0:01   -1.0   \n",
       "4  世界杯分 2018-06-28 02:00:00    瑞士  1.629  3.597  6.872  哥斯达黎加  2:02    0.0   \n",
       "\n",
       "          主客  \n",
       "0    英格兰,比利时  \n",
       "1    巴拿马,突尼斯  \n",
       "2  塞内加尔,哥伦比亚  \n",
       "3      日本,波兰  \n",
       "4   瑞士,哥斯达黎加  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import re\n",
    "\n",
    "result_group = pd.read_csv(r\"D:\\worldcup\\world_cup.csv\", encoding='gbk')\n",
    "result_group['时间'] = pd.to_datetime(result_group['时间'])\n",
    "result_group['主'] = [float(re.search(r'^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$', x).group()) for x in result_group['主']]\n",
    "result_group['和'] = [float(re.search(r'^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$', x).group()) for x in result_group['和']]\n",
    "result_group['客'] = [float(re.search(r'^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$', x).group()) for x in result_group['客']]\n",
    "result_group['真实净胜球'] = [float(x.split(':')[0])-float(x.split(':')[1]) for x in result_group['比分']]\n",
    "result_group['主客'] = result_group['主队'].str.cat(result_group['客队'], sep=',')\n",
    "result_group.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>competition_time</th>\n",
       "      <th>净胜球</th>\n",
       "      <th>主客</th>\n",
       "      <th>赛事</th>\n",
       "      <th>时间</th>\n",
       "      <th>主队</th>\n",
       "      <th>主</th>\n",
       "      <th>和</th>\n",
       "      <th>客</th>\n",
       "      <th>客队</th>\n",
       "      <th>比分</th>\n",
       "      <th>真实净胜球</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018-06-30 22:00:00</td>\n",
       "      <td>0.405893</td>\n",
       "      <td>法国,阿根廷</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-06-30 22:00:00</td>\n",
       "      <td>法国</td>\n",
       "      <td>2.405</td>\n",
       "      <td>3.076</td>\n",
       "      <td>3.358</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>4:03</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2018-07-01 02:00:00</td>\n",
       "      <td>-0.408475</td>\n",
       "      <td>乌拉圭,葡萄牙</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-01 02:00:00</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>2.981</td>\n",
       "      <td>2.936</td>\n",
       "      <td>2.771</td>\n",
       "      <td>葡萄牙</td>\n",
       "      <td>2:01</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018-07-01 22:00:00</td>\n",
       "      <td>0.660441</td>\n",
       "      <td>西班牙,俄罗斯</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-01 22:00:00</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>1.582</td>\n",
       "      <td>4.035</td>\n",
       "      <td>6.342</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018-07-02 02:00:00</td>\n",
       "      <td>-0.044530</td>\n",
       "      <td>克罗地亚,丹麦</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-02 02:00:00</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>1.945</td>\n",
       "      <td>3.216</td>\n",
       "      <td>4.721</td>\n",
       "      <td>丹麦</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2018-07-02 22:00:00</td>\n",
       "      <td>0.487959</td>\n",
       "      <td>巴西,墨西哥</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-02 22:00:00</td>\n",
       "      <td>巴西</td>\n",
       "      <td>1.482</td>\n",
       "      <td>4.354</td>\n",
       "      <td>7.427</td>\n",
       "      <td>墨西哥</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2018-07-03 02:00:00</td>\n",
       "      <td>0.577152</td>\n",
       "      <td>比利时,日本</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-03 02:00:00</td>\n",
       "      <td>比利时</td>\n",
       "      <td>1.397</td>\n",
       "      <td>4.726</td>\n",
       "      <td>9.043</td>\n",
       "      <td>日本</td>\n",
       "      <td>3:02</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2018-07-03 22:00:00</td>\n",
       "      <td>0.200937</td>\n",
       "      <td>瑞典,瑞士</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-03 22:00:00</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>3.235</td>\n",
       "      <td>2.926</td>\n",
       "      <td>2.571</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>1:00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2018-07-04 02:00:00</td>\n",
       "      <td>0.077105</td>\n",
       "      <td>哥伦比亚,英格兰</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-04 02:00:00</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>4.019</td>\n",
       "      <td>3.116</td>\n",
       "      <td>2.132</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2018-06-14 23:00:00</td>\n",
       "      <td>0.824845</td>\n",
       "      <td>俄罗斯,沙特阿拉伯</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-14 23:00:00</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>1.421</td>\n",
       "      <td>4.331</td>\n",
       "      <td>9.181</td>\n",
       "      <td>沙特阿拉伯</td>\n",
       "      <td>5:00</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2018-06-15 20:00:00</td>\n",
       "      <td>-0.275923</td>\n",
       "      <td>埃及,乌拉圭</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-15 20:00:00</td>\n",
       "      <td>埃及</td>\n",
       "      <td>6.833</td>\n",
       "      <td>3.776</td>\n",
       "      <td>1.578</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2018-06-20 02:00:00</td>\n",
       "      <td>0.299574</td>\n",
       "      <td>俄罗斯,埃及</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-20 02:00:00</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>1.959</td>\n",
       "      <td>3.357</td>\n",
       "      <td>4.242</td>\n",
       "      <td>埃及</td>\n",
       "      <td>3:01</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2018-06-20 23:00:00</td>\n",
       "      <td>0.498543</td>\n",
       "      <td>乌拉圭,沙特阿拉伯</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-20 23:00:00</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>1.210</td>\n",
       "      <td>6.435</td>\n",
       "      <td>16.375</td>\n",
       "      <td>沙特阿拉伯</td>\n",
       "      <td>1:00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2018-06-25 22:00:00</td>\n",
       "      <td>-0.141609</td>\n",
       "      <td>沙特阿拉伯,埃及</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-25 22:00:00</td>\n",
       "      <td>沙特阿拉伯</td>\n",
       "      <td>4.989</td>\n",
       "      <td>3.550</td>\n",
       "      <td>1.782</td>\n",
       "      <td>埃及</td>\n",
       "      <td>2:01</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2018-06-25 22:00:00</td>\n",
       "      <td>0.098682</td>\n",
       "      <td>俄罗斯,乌拉圭</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-25 22:00:00</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>2.927</td>\n",
       "      <td>3.049</td>\n",
       "      <td>2.655</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>0:03</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2018-06-15 23:00:00</td>\n",
       "      <td>-0.107328</td>\n",
       "      <td>摩洛哥,伊朗</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-15 23:00:00</td>\n",
       "      <td>摩洛哥</td>\n",
       "      <td>2.248</td>\n",
       "      <td>2.978</td>\n",
       "      <td>3.726</td>\n",
       "      <td>伊朗</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2018-06-16 02:00:00</td>\n",
       "      <td>-0.464226</td>\n",
       "      <td>葡萄牙,西班牙</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-16 02:00:00</td>\n",
       "      <td>葡萄牙</td>\n",
       "      <td>4.076</td>\n",
       "      <td>3.261</td>\n",
       "      <td>2.006</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>3:03</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2018-06-20 20:00:00</td>\n",
       "      <td>0.277806</td>\n",
       "      <td>葡萄牙,摩洛哥</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-20 20:00:00</td>\n",
       "      <td>葡萄牙</td>\n",
       "      <td>1.641</td>\n",
       "      <td>3.678</td>\n",
       "      <td>6.097</td>\n",
       "      <td>摩洛哥</td>\n",
       "      <td>1:00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2018-06-21 02:00:00</td>\n",
       "      <td>-0.326099</td>\n",
       "      <td>伊朗,西班牙</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-21 02:00:00</td>\n",
       "      <td>伊朗</td>\n",
       "      <td>17.991</td>\n",
       "      <td>6.492</td>\n",
       "      <td>1.196</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2018-06-26 02:00:00</td>\n",
       "      <td>-0.063409</td>\n",
       "      <td>伊朗,葡萄牙</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-26 02:00:00</td>\n",
       "      <td>伊朗</td>\n",
       "      <td>6.655</td>\n",
       "      <td>4.014</td>\n",
       "      <td>1.568</td>\n",
       "      <td>葡萄牙</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2018-06-26 02:00:00</td>\n",
       "      <td>0.373414</td>\n",
       "      <td>西班牙,摩洛哥</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-26 02:00:00</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>1.356</td>\n",
       "      <td>4.907</td>\n",
       "      <td>9.589</td>\n",
       "      <td>摩洛哥</td>\n",
       "      <td>2:02</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2018-06-16 18:00:00</td>\n",
       "      <td>0.880400</td>\n",
       "      <td>法国,澳大利亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-16 18:00:00</td>\n",
       "      <td>法国</td>\n",
       "      <td>1.239</td>\n",
       "      <td>6.296</td>\n",
       "      <td>12.130</td>\n",
       "      <td>澳大利亚</td>\n",
       "      <td>2:01</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2018-06-16 23:59:00</td>\n",
       "      <td>-0.496810</td>\n",
       "      <td>秘鲁,丹麦</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-16 23:59:00</td>\n",
       "      <td>秘鲁</td>\n",
       "      <td>3.488</td>\n",
       "      <td>3.123</td>\n",
       "      <td>2.282</td>\n",
       "      <td>丹麦</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2018-06-21 20:00:00</td>\n",
       "      <td>0.541176</td>\n",
       "      <td>丹麦,澳大利亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-21 20:00:00</td>\n",
       "      <td>丹麦</td>\n",
       "      <td>1.897</td>\n",
       "      <td>3.378</td>\n",
       "      <td>4.507</td>\n",
       "      <td>澳大利亚</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2018-06-21 23:00:00</td>\n",
       "      <td>0.561171</td>\n",
       "      <td>法国,秘鲁</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-21 23:00:00</td>\n",
       "      <td>法国</td>\n",
       "      <td>1.559</td>\n",
       "      <td>3.962</td>\n",
       "      <td>6.931</td>\n",
       "      <td>秘鲁</td>\n",
       "      <td>1:00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2018-06-26 22:00:00</td>\n",
       "      <td>-0.520624</td>\n",
       "      <td>澳大利亚,秘鲁</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-26 22:00:00</td>\n",
       "      <td>澳大利亚</td>\n",
       "      <td>2.991</td>\n",
       "      <td>3.433</td>\n",
       "      <td>2.397</td>\n",
       "      <td>秘鲁</td>\n",
       "      <td>0:02</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2018-06-26 22:00:00</td>\n",
       "      <td>-0.621076</td>\n",
       "      <td>丹麦,法国</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-26 22:00:00</td>\n",
       "      <td>丹麦</td>\n",
       "      <td>5.228</td>\n",
       "      <td>2.892</td>\n",
       "      <td>2.004</td>\n",
       "      <td>法国</td>\n",
       "      <td>0:00</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2018-06-16 21:00:00</td>\n",
       "      <td>0.710319</td>\n",
       "      <td>阿根廷,冰岛</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-16 21:00:00</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>1.336</td>\n",
       "      <td>4.890</td>\n",
       "      <td>10.360</td>\n",
       "      <td>冰岛</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2018-06-17 03:00:00</td>\n",
       "      <td>-0.000198</td>\n",
       "      <td>克罗地亚,尼日利亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-17 03:00:00</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>1.714</td>\n",
       "      <td>3.616</td>\n",
       "      <td>5.456</td>\n",
       "      <td>尼日利亚</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2018-06-22 02:00:00</td>\n",
       "      <td>0.264655</td>\n",
       "      <td>阿根廷,克罗地亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-22 02:00:00</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>2.034</td>\n",
       "      <td>3.283</td>\n",
       "      <td>4.049</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>0:03</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2018-06-22 23:00:00</td>\n",
       "      <td>0.122830</td>\n",
       "      <td>尼日利亚,冰岛</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-22 23:00:00</td>\n",
       "      <td>尼日利亚</td>\n",
       "      <td>2.910</td>\n",
       "      <td>3.063</td>\n",
       "      <td>2.661</td>\n",
       "      <td>冰岛</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2018-06-27 02:00:00</td>\n",
       "      <td>-0.089284</td>\n",
       "      <td>冰岛,克罗地亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-27 02:00:00</td>\n",
       "      <td>冰岛</td>\n",
       "      <td>4.239</td>\n",
       "      <td>3.749</td>\n",
       "      <td>1.850</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>2018-06-27 02:00:00</td>\n",
       "      <td>-0.392545</td>\n",
       "      <td>尼日利亚,阿根廷</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-27 02:00:00</td>\n",
       "      <td>尼日利亚</td>\n",
       "      <td>6.160</td>\n",
       "      <td>4.776</td>\n",
       "      <td>1.489</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2018-06-17 20:00:00</td>\n",
       "      <td>-0.074098</td>\n",
       "      <td>哥斯达黎加,塞尔维亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-17 20:00:00</td>\n",
       "      <td>哥斯达黎加</td>\n",
       "      <td>4.831</td>\n",
       "      <td>3.306</td>\n",
       "      <td>1.866</td>\n",
       "      <td>塞尔维亚</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>2018-06-18 02:00:00</td>\n",
       "      <td>0.341689</td>\n",
       "      <td>巴西,瑞士</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-18 02:00:00</td>\n",
       "      <td>巴西</td>\n",
       "      <td>1.419</td>\n",
       "      <td>4.451</td>\n",
       "      <td>8.591</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>2018-06-22 20:00:00</td>\n",
       "      <td>0.825737</td>\n",
       "      <td>巴西,哥斯达黎加</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-22 20:00:00</td>\n",
       "      <td>巴西</td>\n",
       "      <td>1.208</td>\n",
       "      <td>6.351</td>\n",
       "      <td>16.772</td>\n",
       "      <td>哥斯达黎加</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>2018-06-23 02:00:00</td>\n",
       "      <td>-0.002520</td>\n",
       "      <td>塞尔维亚,瑞士</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-23 02:00:00</td>\n",
       "      <td>塞尔维亚</td>\n",
       "      <td>2.757</td>\n",
       "      <td>3.019</td>\n",
       "      <td>2.852</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>-0.799753</td>\n",
       "      <td>塞尔维亚,巴西</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>塞尔维亚</td>\n",
       "      <td>7.364</td>\n",
       "      <td>4.484</td>\n",
       "      <td>1.458</td>\n",
       "      <td>巴西</td>\n",
       "      <td>0:02</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>0.078777</td>\n",
       "      <td>瑞士,哥斯达黎加</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>1.629</td>\n",
       "      <td>3.597</td>\n",
       "      <td>6.872</td>\n",
       "      <td>哥斯达黎加</td>\n",
       "      <td>2:02</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>2018-06-17 23:00:00</td>\n",
       "      <td>0.382727</td>\n",
       "      <td>德国,墨西哥</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-17 23:00:00</td>\n",
       "      <td>德国</td>\n",
       "      <td>1.463</td>\n",
       "      <td>4.441</td>\n",
       "      <td>7.298</td>\n",
       "      <td>墨西哥</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>2018-06-18 20:00:00</td>\n",
       "      <td>0.187302</td>\n",
       "      <td>瑞典,韩国</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-18 20:00:00</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>2.181</td>\n",
       "      <td>3.062</td>\n",
       "      <td>3.868</td>\n",
       "      <td>韩国</td>\n",
       "      <td>1:00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>2018-06-23 23:00:00</td>\n",
       "      <td>-0.221690</td>\n",
       "      <td>韩国,墨西哥</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-23 23:00:00</td>\n",
       "      <td>韩国</td>\n",
       "      <td>5.313</td>\n",
       "      <td>3.634</td>\n",
       "      <td>1.738</td>\n",
       "      <td>墨西哥</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>2018-06-24 02:00:00</td>\n",
       "      <td>0.789900</td>\n",
       "      <td>德国,瑞典</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-24 02:00:00</td>\n",
       "      <td>德国</td>\n",
       "      <td>1.482</td>\n",
       "      <td>4.398</td>\n",
       "      <td>6.991</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>2:01</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>2018-06-27 22:00:00</td>\n",
       "      <td>-0.723100</td>\n",
       "      <td>韩国,德国</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-27 22:00:00</td>\n",
       "      <td>韩国</td>\n",
       "      <td>15.884</td>\n",
       "      <td>7.263</td>\n",
       "      <td>1.190</td>\n",
       "      <td>德国</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>2018-06-27 22:00:00</td>\n",
       "      <td>-0.204403</td>\n",
       "      <td>墨西哥,瑞典</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-27 22:00:00</td>\n",
       "      <td>墨西哥</td>\n",
       "      <td>2.301</td>\n",
       "      <td>3.276</td>\n",
       "      <td>3.289</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>0:03</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>2018-06-18 23:00:00</td>\n",
       "      <td>0.369149</td>\n",
       "      <td>比利时,巴拿马</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-18 23:00:00</td>\n",
       "      <td>比利时</td>\n",
       "      <td>1.193</td>\n",
       "      <td>6.660</td>\n",
       "      <td>17.478</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>3:00</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>2018-06-19 02:00:00</td>\n",
       "      <td>-0.333333</td>\n",
       "      <td>突尼斯,英格兰</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-19 02:00:00</td>\n",
       "      <td>突尼斯</td>\n",
       "      <td>8.755</td>\n",
       "      <td>4.310</td>\n",
       "      <td>1.434</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>2018-06-23 20:00:00</td>\n",
       "      <td>0.378684</td>\n",
       "      <td>比利时,突尼斯</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-23 20:00:00</td>\n",
       "      <td>比利时</td>\n",
       "      <td>1.326</td>\n",
       "      <td>5.025</td>\n",
       "      <td>10.770</td>\n",
       "      <td>突尼斯</td>\n",
       "      <td>5:02</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>2018-06-24 20:00:00</td>\n",
       "      <td>0.620594</td>\n",
       "      <td>英格兰,巴拿马</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-24 20:00:00</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>1.216</td>\n",
       "      <td>6.185</td>\n",
       "      <td>16.615</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>6:01</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>-0.190353</td>\n",
       "      <td>英格兰,比利时</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>2.551</td>\n",
       "      <td>2.936</td>\n",
       "      <td>3.273</td>\n",
       "      <td>比利时</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>巴拿马,突尼斯</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>4.170</td>\n",
       "      <td>3.577</td>\n",
       "      <td>1.923</td>\n",
       "      <td>突尼斯</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>2018-06-19 20:00:00</td>\n",
       "      <td>0.677823</td>\n",
       "      <td>哥伦比亚,日本</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-19 20:00:00</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>1.820</td>\n",
       "      <td>3.373</td>\n",
       "      <td>5.084</td>\n",
       "      <td>日本</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>2018-06-19 23:00:00</td>\n",
       "      <td>-0.064392</td>\n",
       "      <td>波兰,塞内加尔</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-19 23:00:00</td>\n",
       "      <td>波兰</td>\n",
       "      <td>2.375</td>\n",
       "      <td>3.084</td>\n",
       "      <td>3.340</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>1:02</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>2018-06-24 23:00:00</td>\n",
       "      <td>0.050117</td>\n",
       "      <td>日本,塞内加尔</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-24 23:00:00</td>\n",
       "      <td>日本</td>\n",
       "      <td>3.143</td>\n",
       "      <td>3.043</td>\n",
       "      <td>2.516</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>2:02</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>2018-06-25 02:00:00</td>\n",
       "      <td>-0.429224</td>\n",
       "      <td>波兰,哥伦比亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-25 02:00:00</td>\n",
       "      <td>波兰</td>\n",
       "      <td>3.336</td>\n",
       "      <td>3.344</td>\n",
       "      <td>2.252</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>0:03</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>0.111394</td>\n",
       "      <td>日本,波兰</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>日本</td>\n",
       "      <td>3.062</td>\n",
       "      <td>3.165</td>\n",
       "      <td>2.577</td>\n",
       "      <td>波兰</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>-0.746772</td>\n",
       "      <td>塞内加尔,哥伦比亚</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>4.710</td>\n",
       "      <td>3.607</td>\n",
       "      <td>1.809</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>0:01</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      competition_time       净胜球          主客    赛事                  时间     主队  \\\n",
       "0  2018-06-30 22:00:00  0.405893      法国,阿根廷  世界杯1 2018-06-30 22:00:00     法国   \n",
       "1  2018-07-01 02:00:00 -0.408475     乌拉圭,葡萄牙  世界杯1 2018-07-01 02:00:00    乌拉圭   \n",
       "2  2018-07-01 22:00:00  0.660441     西班牙,俄罗斯  世界杯1 2018-07-01 22:00:00    西班牙   \n",
       "3  2018-07-02 02:00:00 -0.044530     克罗地亚,丹麦  世界杯1 2018-07-02 02:00:00   克罗地亚   \n",
       "4  2018-07-02 22:00:00  0.487959      巴西,墨西哥  世界杯1 2018-07-02 22:00:00     巴西   \n",
       "5  2018-07-03 02:00:00  0.577152      比利时,日本  世界杯1 2018-07-03 02:00:00    比利时   \n",
       "6  2018-07-03 22:00:00  0.200937       瑞典,瑞士  世界杯1 2018-07-03 22:00:00     瑞典   \n",
       "7  2018-07-04 02:00:00  0.077105    哥伦比亚,英格兰  世界杯1 2018-07-04 02:00:00   哥伦比亚   \n",
       "8  2018-06-14 23:00:00  0.824845   俄罗斯,沙特阿拉伯  世界杯分 2018-06-14 23:00:00    俄罗斯   \n",
       "9  2018-06-15 20:00:00 -0.275923      埃及,乌拉圭  世界杯分 2018-06-15 20:00:00     埃及   \n",
       "10 2018-06-20 02:00:00  0.299574      俄罗斯,埃及  世界杯分 2018-06-20 02:00:00    俄罗斯   \n",
       "11 2018-06-20 23:00:00  0.498543   乌拉圭,沙特阿拉伯  世界杯分 2018-06-20 23:00:00    乌拉圭   \n",
       "12 2018-06-25 22:00:00 -0.141609    沙特阿拉伯,埃及  世界杯分 2018-06-25 22:00:00  沙特阿拉伯   \n",
       "13 2018-06-25 22:00:00  0.098682     俄罗斯,乌拉圭  世界杯分 2018-06-25 22:00:00    俄罗斯   \n",
       "14 2018-06-15 23:00:00 -0.107328      摩洛哥,伊朗  世界杯分 2018-06-15 23:00:00    摩洛哥   \n",
       "15 2018-06-16 02:00:00 -0.464226     葡萄牙,西班牙  世界杯分 2018-06-16 02:00:00    葡萄牙   \n",
       "16 2018-06-20 20:00:00  0.277806     葡萄牙,摩洛哥  世界杯分 2018-06-20 20:00:00    葡萄牙   \n",
       "17 2018-06-21 02:00:00 -0.326099      伊朗,西班牙  世界杯分 2018-06-21 02:00:00     伊朗   \n",
       "18 2018-06-26 02:00:00 -0.063409      伊朗,葡萄牙  世界杯分 2018-06-26 02:00:00     伊朗   \n",
       "19 2018-06-26 02:00:00  0.373414     西班牙,摩洛哥  世界杯分 2018-06-26 02:00:00    西班牙   \n",
       "20 2018-06-16 18:00:00  0.880400     法国,澳大利亚  世界杯分 2018-06-16 18:00:00     法国   \n",
       "21 2018-06-16 23:59:00 -0.496810       秘鲁,丹麦  世界杯分 2018-06-16 23:59:00     秘鲁   \n",
       "22 2018-06-21 20:00:00  0.541176     丹麦,澳大利亚  世界杯分 2018-06-21 20:00:00     丹麦   \n",
       "23 2018-06-21 23:00:00  0.561171       法国,秘鲁  世界杯分 2018-06-21 23:00:00     法国   \n",
       "24 2018-06-26 22:00:00 -0.520624     澳大利亚,秘鲁  世界杯分 2018-06-26 22:00:00   澳大利亚   \n",
       "25 2018-06-26 22:00:00 -0.621076       丹麦,法国  世界杯分 2018-06-26 22:00:00     丹麦   \n",
       "26 2018-06-16 21:00:00  0.710319      阿根廷,冰岛  世界杯分 2018-06-16 21:00:00    阿根廷   \n",
       "27 2018-06-17 03:00:00 -0.000198   克罗地亚,尼日利亚  世界杯分 2018-06-17 03:00:00   克罗地亚   \n",
       "28 2018-06-22 02:00:00  0.264655    阿根廷,克罗地亚  世界杯分 2018-06-22 02:00:00    阿根廷   \n",
       "29 2018-06-22 23:00:00  0.122830     尼日利亚,冰岛  世界杯分 2018-06-22 23:00:00   尼日利亚   \n",
       "30 2018-06-27 02:00:00 -0.089284     冰岛,克罗地亚  世界杯分 2018-06-27 02:00:00     冰岛   \n",
       "31 2018-06-27 02:00:00 -0.392545    尼日利亚,阿根廷  世界杯分 2018-06-27 02:00:00   尼日利亚   \n",
       "32 2018-06-17 20:00:00 -0.074098  哥斯达黎加,塞尔维亚  世界杯分 2018-06-17 20:00:00  哥斯达黎加   \n",
       "33 2018-06-18 02:00:00  0.341689       巴西,瑞士  世界杯分 2018-06-18 02:00:00     巴西   \n",
       "34 2018-06-22 20:00:00  0.825737    巴西,哥斯达黎加  世界杯分 2018-06-22 20:00:00     巴西   \n",
       "35 2018-06-23 02:00:00 -0.002520     塞尔维亚,瑞士  世界杯分 2018-06-23 02:00:00   塞尔维亚   \n",
       "36 2018-06-28 02:00:00 -0.799753     塞尔维亚,巴西  世界杯分 2018-06-28 02:00:00   塞尔维亚   \n",
       "37 2018-06-28 02:00:00  0.078777    瑞士,哥斯达黎加  世界杯分 2018-06-28 02:00:00     瑞士   \n",
       "38 2018-06-17 23:00:00  0.382727      德国,墨西哥  世界杯分 2018-06-17 23:00:00     德国   \n",
       "39 2018-06-18 20:00:00  0.187302       瑞典,韩国  世界杯分 2018-06-18 20:00:00     瑞典   \n",
       "40 2018-06-23 23:00:00 -0.221690      韩国,墨西哥  世界杯分 2018-06-23 23:00:00     韩国   \n",
       "41 2018-06-24 02:00:00  0.789900       德国,瑞典  世界杯分 2018-06-24 02:00:00     德国   \n",
       "42 2018-06-27 22:00:00 -0.723100       韩国,德国  世界杯分 2018-06-27 22:00:00     韩国   \n",
       "43 2018-06-27 22:00:00 -0.204403      墨西哥,瑞典  世界杯分 2018-06-27 22:00:00    墨西哥   \n",
       "44 2018-06-18 23:00:00  0.369149     比利时,巴拿马  世界杯分 2018-06-18 23:00:00    比利时   \n",
       "45 2018-06-19 02:00:00 -0.333333     突尼斯,英格兰  世界杯分 2018-06-19 02:00:00    突尼斯   \n",
       "46 2018-06-23 20:00:00  0.378684     比利时,突尼斯  世界杯分 2018-06-23 20:00:00    比利时   \n",
       "47 2018-06-24 20:00:00  0.620594     英格兰,巴拿马  世界杯分 2018-06-24 20:00:00    英格兰   \n",
       "48 2018-06-29 02:00:00 -0.190353     英格兰,比利时  世界杯分 2018-06-29 02:00:00    英格兰   \n",
       "49 2018-06-29 02:00:00  0.000000     巴拿马,突尼斯  世界杯分 2018-06-29 02:00:00    巴拿马   \n",
       "50 2018-06-19 20:00:00  0.677823     哥伦比亚,日本  世界杯分 2018-06-19 20:00:00   哥伦比亚   \n",
       "51 2018-06-19 23:00:00 -0.064392     波兰,塞内加尔  世界杯分 2018-06-19 23:00:00     波兰   \n",
       "52 2018-06-24 23:00:00  0.050117     日本,塞内加尔  世界杯分 2018-06-24 23:00:00     日本   \n",
       "53 2018-06-25 02:00:00 -0.429224     波兰,哥伦比亚  世界杯分 2018-06-25 02:00:00     波兰   \n",
       "54 2018-06-28 22:00:00  0.111394       日本,波兰  世界杯分 2018-06-28 22:00:00     日本   \n",
       "55 2018-06-28 22:00:00 -0.746772   塞内加尔,哥伦比亚  世界杯分 2018-06-28 22:00:00   塞内加尔   \n",
       "\n",
       "         主      和       客     客队    比分  真实净胜球  \n",
       "0    2.405  3.076   3.358    阿根廷  4:03    1.0  \n",
       "1    2.981  2.936   2.771    葡萄牙  2:01    1.0  \n",
       "2    1.582  4.035   6.342    俄罗斯  1:01    0.0  \n",
       "3    1.945  3.216   4.721     丹麦  1:01    0.0  \n",
       "4    1.482  4.354   7.427    墨西哥  2:00    2.0  \n",
       "5    1.397  4.726   9.043     日本  3:02    1.0  \n",
       "6    3.235  2.926   2.571     瑞士  1:00    1.0  \n",
       "7    4.019  3.116   2.132    英格兰  1:01    0.0  \n",
       "8    1.421  4.331   9.181  沙特阿拉伯  5:00    5.0  \n",
       "9    6.833  3.776   1.578    乌拉圭  0:01   -1.0  \n",
       "10   1.959  3.357   4.242     埃及  3:01    2.0  \n",
       "11   1.210  6.435  16.375  沙特阿拉伯  1:00    1.0  \n",
       "12   4.989  3.550   1.782     埃及  2:01    1.0  \n",
       "13   2.927  3.049   2.655    乌拉圭  0:03   -3.0  \n",
       "14   2.248  2.978   3.726     伊朗  0:01   -1.0  \n",
       "15   4.076  3.261   2.006    西班牙  3:03    0.0  \n",
       "16   1.641  3.678   6.097    摩洛哥  1:00    1.0  \n",
       "17  17.991  6.492   1.196    西班牙  0:01   -1.0  \n",
       "18   6.655  4.014   1.568    葡萄牙  1:01    0.0  \n",
       "19   1.356  4.907   9.589    摩洛哥  2:02    0.0  \n",
       "20   1.239  6.296  12.130   澳大利亚  2:01    1.0  \n",
       "21   3.488  3.123   2.282     丹麦  0:01   -1.0  \n",
       "22   1.897  3.378   4.507   澳大利亚  1:01    0.0  \n",
       "23   1.559  3.962   6.931     秘鲁  1:00    1.0  \n",
       "24   2.991  3.433   2.397     秘鲁  0:02   -2.0  \n",
       "25   5.228  2.892   2.004     法国  0:00    0.0  \n",
       "26   1.336  4.890  10.360     冰岛  1:01    0.0  \n",
       "27   1.714  3.616   5.456   尼日利亚  2:00    2.0  \n",
       "28   2.034  3.283   4.049   克罗地亚  0:03   -3.0  \n",
       "29   2.910  3.063   2.661     冰岛  2:00    2.0  \n",
       "30   4.239  3.749   1.850   克罗地亚  1:02   -1.0  \n",
       "31   6.160  4.776   1.489    阿根廷  1:02   -1.0  \n",
       "32   4.831  3.306   1.866   塞尔维亚  0:01   -1.0  \n",
       "33   1.419  4.451   8.591     瑞士  1:01    0.0  \n",
       "34   1.208  6.351  16.772  哥斯达黎加  2:00    2.0  \n",
       "35   2.757  3.019   2.852     瑞士  1:02   -1.0  \n",
       "36   7.364  4.484   1.458     巴西  0:02   -2.0  \n",
       "37   1.629  3.597   6.872  哥斯达黎加  2:02    0.0  \n",
       "38   1.463  4.441   7.298    墨西哥  0:01   -1.0  \n",
       "39   2.181  3.062   3.868     韩国  1:00    1.0  \n",
       "40   5.313  3.634   1.738    墨西哥  1:02   -1.0  \n",
       "41   1.482  4.398   6.991     瑞典  2:01    1.0  \n",
       "42  15.884  7.263   1.190     德国  2:00    2.0  \n",
       "43   2.301  3.276   3.289     瑞典  0:03   -3.0  \n",
       "44   1.193  6.660  17.478    巴拿马  3:00    3.0  \n",
       "45   8.755  4.310   1.434    英格兰  1:02   -1.0  \n",
       "46   1.326  5.025  10.770    突尼斯  5:02    3.0  \n",
       "47   1.216  6.185  16.615    巴拿马  6:01    5.0  \n",
       "48   2.551  2.936   3.273    比利时  0:01   -1.0  \n",
       "49   4.170  3.577   1.923    突尼斯  1:02   -1.0  \n",
       "50   1.820  3.373   5.084     日本  1:02   -1.0  \n",
       "51   2.375  3.084   3.340   塞内加尔  1:02   -1.0  \n",
       "52   3.143  3.043   2.516   塞内加尔  2:02    0.0  \n",
       "53   3.336  3.344   2.252   哥伦比亚  0:03   -3.0  \n",
       "54   3.062  3.165   2.577     波兰  0:01   -1.0  \n",
       "55   4.710  3.607   1.809   哥伦比亚  0:01   -1.0  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_all = pd.merge(result_pro, result_group, on = '主客')\n",
    "result_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "相关系数： [[ 1.          0.49084892]\n",
      " [ 0.49084892  1.        ]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEICAYAAABfz4NwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3X90HHd56P/3M7OzWkmWLDm2YxNL\ndgQpgZQk/pEcQsG4acKXb8tNAzeAe6AtUG58KW3Tby89pQXybdOW0tse7glt4TqUXnrpLQbSlqbl\ncoFAXRe+hNiOHSCti8GJLQc7cmzJ+rG/Z57vHzMry/JKuyvt7uyuntc5PiutRjPPjEfz7Mzz+SGq\nijHGGOPEHYAxxpjWYAnBGGMMYAnBGGNMxBKCMcYYwBKCMcaYiCUEY4wxgCUEY4wxEUsIxhhjAEsI\nxhhjIom4A6jF2rVrdcuWLXGHYYwxbeXw4cPPq+q6Ssu1VULYsmULhw4dijsMY4xpKyJysprl7JGR\nMcYYwBKCMcaYiCUEY4wxgCUEY4wxEUsIxhhjgJhbGYlIAjgR/QP4ZVX9TowhGWM6zP5jY+w9cILR\n8TRDgz3s2TnCruvXW0xlxH2HcCPwaVXdFf2zZGCMqZv9x8a4/5GnGJvKMtDtMTaV5f5HnmL/sTGL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y\nPwP8roiMNGOnjKlGy4+tYUwzqeqXRGQrcD/w88AvE35w+iBwXkR+RFW/B1wdjfS6AbidcKiNWwnb\n/U8CB1X1n0REgR2q+jci8ghQBP5BVV8nIl70vTEtwe4QjJlHVT9E+Kn+PwI5wg5G7yG8E3hntNhz\n0R3CKeA1hAnj34G/UtWPwOwwzk74pSQIR+ns5dIHsf8C2B2CaRl2h2DMPCJyE/AThAkhAwwDv07Y\nqW6diJyes3hA2AFP5vy+p6oF4KeBDxAO2XGGMGHcRdjj9j8R9oL/bw3fIWOqZP0QjJlHRP4n4YTp\nj6tqPnru/1rC0Vdfq6rvFZGjhMNwjAC/RHgHcTNwDDihqv85WtcuwkdGfxx9/zvA24GLwK2qmmni\nrhmzKLtDMGYOEbkW2Ew4BtNXRKRA+KjofxPeDXwuGvDwrKreLSL/qKoHgAMi8kngt1X1mXmr9UTk\nRsI7jQ2Ew3E8Cvwc4aRLxrQESwjGXG438GD0yf3VANEdwk+qajb6fidwPFreXWhF0aOnX4qWmSBs\nWfQa4GHgI8DDInJeVR9uzK4YUxt7ZGTMHNGnf1Q1iL7/A+CtwBZV9aP3HgD+iTB5rAKyhE1ONxHO\n9uYQjsh5LlrXyej3XMK6xH9S1TtFpCf6ebpZ+2fMYiwhGLMIEdkGnFbVsTI/c0qJo4b1DQNpVX2+\nXjEaUy+WEIwxxgDWD8EYY0zEEoIxxhjAEoIxxpiIJQRjjDGAJQRjjDGR/x87cqAD9iicYwAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc0a0128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import numpy as np\n",
    "%matplotlib inline\n",
    "\n",
    "plt.rcParams['font.sans-serif']=['SimHei']\n",
    "sns.regplot(x=\"净胜球\", y=\"真实净胜球\", data=result_all)\n",
    "np.corrcoef(result_all.loc[:, [\"净胜球\", \"真实净胜球\"]],rowvar=0)\n",
    "print('相关系数：', np.corrcoef(result_all.loc[:, [\"净胜球\", \"真实净胜球\"]],rowvar=0))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>competition_time</th>\n",
       "      <th>净胜球</th>\n",
       "      <th>主客</th>\n",
       "      <th>赛事</th>\n",
       "      <th>时间</th>\n",
       "      <th>主队</th>\n",
       "      <th>主</th>\n",
       "      <th>和</th>\n",
       "      <th>客</th>\n",
       "      <th>客队</th>\n",
       "      <th>比分</th>\n",
       "      <th>真实净胜球</th>\n",
       "      <th>money</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018-06-30 22:00:00</td>\n",
       "      <td>0.405893</td>\n",
       "      <td>法国,阿根廷</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-06-30 22:00:00</td>\n",
       "      <td>法国</td>\n",
       "      <td>2.405</td>\n",
       "      <td>3.076</td>\n",
       "      <td>3.358</td>\n",
       "      <td>阿根廷</td>\n",
       "      <td>4:03</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2018-07-01 02:00:00</td>\n",
       "      <td>-0.408475</td>\n",
       "      <td>乌拉圭,葡萄牙</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-01 02:00:00</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>2.981</td>\n",
       "      <td>2.936</td>\n",
       "      <td>2.771</td>\n",
       "      <td>葡萄牙</td>\n",
       "      <td>2:01</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018-07-01 22:00:00</td>\n",
       "      <td>0.660441</td>\n",
       "      <td>西班牙,俄罗斯</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-01 22:00:00</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>1.582</td>\n",
       "      <td>4.035</td>\n",
       "      <td>6.342</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4.035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018-07-02 02:00:00</td>\n",
       "      <td>-0.044530</td>\n",
       "      <td>克罗地亚,丹麦</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-02 02:00:00</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>1.945</td>\n",
       "      <td>3.216</td>\n",
       "      <td>4.721</td>\n",
       "      <td>丹麦</td>\n",
       "      <td>1:01</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.216</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2018-07-02 22:00:00</td>\n",
       "      <td>0.487959</td>\n",
       "      <td>巴西,墨西哥</td>\n",
       "      <td>世界杯1</td>\n",
       "      <td>2018-07-02 22:00:00</td>\n",
       "      <td>巴西</td>\n",
       "      <td>1.482</td>\n",
       "      <td>4.354</td>\n",
       "      <td>7.427</td>\n",
       "      <td>墨西哥</td>\n",
       "      <td>2:00</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.482</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     competition_time       净胜球       主客    赛事                  时间    主队  \\\n",
       "0 2018-06-30 22:00:00  0.405893   法国,阿根廷  世界杯1 2018-06-30 22:00:00    法国   \n",
       "1 2018-07-01 02:00:00 -0.408475  乌拉圭,葡萄牙  世界杯1 2018-07-01 02:00:00   乌拉圭   \n",
       "2 2018-07-01 22:00:00  0.660441  西班牙,俄罗斯  世界杯1 2018-07-01 22:00:00   西班牙   \n",
       "3 2018-07-02 02:00:00 -0.044530  克罗地亚,丹麦  世界杯1 2018-07-02 02:00:00  克罗地亚   \n",
       "4 2018-07-02 22:00:00  0.487959   巴西,墨西哥  世界杯1 2018-07-02 22:00:00    巴西   \n",
       "\n",
       "       主      和      客   客队    比分  真实净胜球  money  \n",
       "0  2.405  3.076  3.358  阿根廷  4:03    1.0  2.405  \n",
       "1  2.981  2.936  2.771  葡萄牙  2:01    1.0  0.000  \n",
       "2  1.582  4.035  6.342  俄罗斯  1:01    0.0  4.035  \n",
       "3  1.945  3.216  4.721   丹麦  1:01    0.0  3.216  \n",
       "4  1.482  4.354  7.427  墨西哥  2:00    2.0  1.482  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "for i in range(len(result_all)):\n",
    "    if result_all.loc[i, '净胜球'] > 0.1:\n",
    "        if result_all.loc[i, '真实净胜球'] > 0:\n",
    "            result_all.loc[i, 'money'] = result_all.loc[i, '主']\n",
    "    if result_all.loc[i, '净胜球'] < -0.1:\n",
    "        if result_all.loc[i, '真实净胜球'] < 0:\n",
    "            result_all.loc[i, 'money'] = result_all.loc[i, '客']\n",
    "    else:\n",
    "        if result_all.loc[i, '真实净胜球'] == 0:\n",
    "            result_all.loc[i, 'money'] = result_all.loc[i, '和']\n",
    "result_all = result_all.fillna(0)\n",
    "result_all.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你能赚多少： 1.7077142857142853\n",
      "利率： 0.7077142857142853\n"
     ]
    }
   ],
   "source": [
    "result_all = result_all.sort_values('competition_time').reset_index(drop=True)\n",
    "rate = np.mean(result_all['money'])\n",
    "print('你能赚多少：',rate)\n",
    "print('利率：',(rate-1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2串1： 2.79010134545\n",
      "利率： 1.79010134545\n"
     ]
    }
   ],
   "source": [
    "list_ = []\n",
    "for i in range(len(result_all)-1):\n",
    "    tmp = result_all.loc[i, 'money'] * result_all.loc[i+1, 'money']\n",
    "    list_.append(tmp)\n",
    "print(\"2串1：\",np.mean(list_))\n",
    "print('利率：',(np.mean(list_)-1))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 淘汰赛四强预测"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>team_id</th>\n",
       "      <th>team_name</th>\n",
       "      <th>home_team</th>\n",
       "      <th>visiting_team</th>\n",
       "      <th>type</th>\n",
       "      <th>time</th>\n",
       "      <th>result</th>\n",
       "      <th>foul</th>\n",
       "      <th>yellow_card</th>\n",
       "      <th>red_card</th>\n",
       "      <th>possession</th>\n",
       "      <th>shot</th>\n",
       "      <th>pass</th>\n",
       "      <th>pass_rate</th>\n",
       "      <th>most</th>\n",
       "      <th>score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>665</th>\n",
       "      <td>10</td>\n",
       "      <td>法国</td>\n",
       "      <td>法国</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>国际友谊</td>\n",
       "      <td>2017/3/29 03:00:00</td>\n",
       "      <td>0-2</td>\n",
       "      <td>17</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.41</td>\n",
       "      <td>8(2)</td>\n",
       "      <td>439(371)</td>\n",
       "      <td>0.85</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>699</th>\n",
       "      <td>10</td>\n",
       "      <td>法国</td>\n",
       "      <td>法国</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>国际友谊</td>\n",
       "      <td>2014/9/5 03:00:00</td>\n",
       "      <td>1-0</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.42</td>\n",
       "      <td>10(5)</td>\n",
       "      <td>0(0)</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>717</th>\n",
       "      <td>10</td>\n",
       "      <td>法国</td>\n",
       "      <td>法国</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>欧洲预选</td>\n",
       "      <td>2013/3/27 04:00:00</td>\n",
       "      <td>0-1</td>\n",
       "      <td>21</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0.24</td>\n",
       "      <td>15(3)</td>\n",
       "      <td>0(0)</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>721</th>\n",
       "      <td>10</td>\n",
       "      <td>法国</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>法国</td>\n",
       "      <td>欧洲预选</td>\n",
       "      <td>2012/10/17 03:00:00</td>\n",
       "      <td>1-1</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0.50</td>\n",
       "      <td>7(3)</td>\n",
       "      <td>0(0)</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>725</th>\n",
       "      <td>10</td>\n",
       "      <td>法国</td>\n",
       "      <td>西班牙</td>\n",
       "      <td>法国</td>\n",
       "      <td>欧洲杯</td>\n",
       "      <td>2012/6/24 02:45:00</td>\n",
       "      <td>2-0</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0.45</td>\n",
       "      <td>4(1)</td>\n",
       "      <td>0(0)</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     team_id team_name home_team visiting_team  type                 time  \\\n",
       "665       10        法国        法国           西班牙  国际友谊   2017/3/29 03:00:00   \n",
       "699       10        法国        法国           西班牙  国际友谊    2014/9/5 03:00:00   \n",
       "717       10        法国        法国           西班牙  欧洲预选   2013/3/27 04:00:00   \n",
       "721       10        法国       西班牙            法国  欧洲预选  2012/10/17 03:00:00   \n",
       "725       10        法国       西班牙            法国   欧洲杯   2012/6/24 02:45:00   \n",
       "\n",
       "    result  foul  yellow_card  red_card  possession   shot      pass  \\\n",
       "665    0-2    17            2         0        0.41   8(2)  439(371)   \n",
       "699    1-0     9            0         0        0.42  10(5)      0(0)   \n",
       "717    0-1    21            3         1        0.24  15(3)      0(0)   \n",
       "721    1-1    10            2         2        0.50   7(3)      0(0)   \n",
       "725    2-0    12            2         1        0.45   4(1)      0(0)   \n",
       "\n",
       "     pass_rate  most  score  \n",
       "665       0.85     1      4  \n",
       "699       0.00     0      2  \n",
       "717       0.00     0      5  \n",
       "721       0.00     0      3  \n",
       "725       0.00     0      3  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "historical_record = pd.read_csv(r\"D:\\worldcup\\historical_record.csv\")\n",
    "del historical_record['id']\n",
    "del historical_record['create_time']\n",
    "del historical_record['update_time']\n",
    "historical_record = historical_record.drop_duplicates() \n",
    "historical_record.loc[(historical_record[\"team_name\"] == '法国') & ((historical_record[\"home_team\"] == '西班牙') | (historical_record[\"visiting_team\"] == '西班牙'))]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>foul</th>\n",
       "      <th>home_team</th>\n",
       "      <th>most</th>\n",
       "      <th>pass</th>\n",
       "      <th>pass_rate</th>\n",
       "      <th>possession</th>\n",
       "      <th>red_card</th>\n",
       "      <th>result</th>\n",
       "      <th>score</th>\n",
       "      <th>shot</th>\n",
       "      <th>team_id</th>\n",
       "      <th>team_name</th>\n",
       "      <th>time</th>\n",
       "      <th>type</th>\n",
       "      <th>visiting_team</th>\n",
       "      <th>yellow_card</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0-01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>比利时</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1-02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>巴拿马</td>\n",
       "      <td>2018-06-29 02:00:00</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>突尼斯</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0-01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>塞内加尔</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>哥伦比亚</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>日本</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0-01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>日本</td>\n",
       "      <td>2018-06-28 22:00:00</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>波兰</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NaN</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2-02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>瑞士</td>\n",
       "      <td>2018-06-28 02:00:00</td>\n",
       "      <td>世界杯分</td>\n",
       "      <td>哥斯达黎加</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   foul home_team  most pass  pass_rate  possession  red_card result  score  \\\n",
       "0   NaN       英格兰   NaN  NaN        NaN         NaN       NaN   0-01    NaN   \n",
       "1   NaN       巴拿马   NaN  NaN        NaN         NaN       NaN   1-02    NaN   \n",
       "2   NaN      塞内加尔   NaN  NaN        NaN         NaN       NaN   0-01    NaN   \n",
       "3   NaN        日本   NaN  NaN        NaN         NaN       NaN   0-01    NaN   \n",
       "4   NaN        瑞士   NaN  NaN        NaN         NaN       NaN   2-02    NaN   \n",
       "\n",
       "  shot  team_id team_name                 time  type visiting_team  \\\n",
       "0  NaN      NaN       英格兰  2018-06-29 02:00:00  世界杯分           比利时   \n",
       "1  NaN      NaN       巴拿马  2018-06-29 02:00:00  世界杯分           突尼斯   \n",
       "2  NaN      NaN      塞内加尔  2018-06-28 22:00:00  世界杯分          哥伦比亚   \n",
       "3  NaN      NaN        日本  2018-06-28 22:00:00  世界杯分            波兰   \n",
       "4  NaN      NaN        瑞士  2018-06-28 02:00:00  世界杯分         哥斯达黎加   \n",
       "\n",
       "   yellow_card  \n",
       "0          NaN  \n",
       "1          NaN  \n",
       "2          NaN  \n",
       "3          NaN  \n",
       "4          NaN  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "historical_group = result_group.rename(columns={'主队':'home_team', '客队':'visiting_team', '赛事':'type', '时间':'time', '比分':'result'}).loc[:, ['home_team', 'visiting_team', 'type', 'time', 'result']]\n",
    "historical_group['result'] = historical_group['result'].str.replace(':', '-')\n",
    "historical_group['team_name'] = historical_group['home_team']\n",
    "historical_group1 = pd.DataFrame(historical_group.values, columns=['home_team', 'visiting_team', 'type', 'time', 'result', 'team_name'])\n",
    "historical_group['team_name'] = historical_group['visiting_team']\n",
    "historical_group2 = pd.DataFrame(historical_group.values, columns=['home_team', 'visiting_team', 'type', 'time', 'result', 'team_name'])\n",
    "\n",
    "historical_record_group = pd.concat([historical_group1, historical_group2, historical_record])\n",
    "\n",
    "historical_record_group.to_csv(r\"D:\\worldcup\\historical_record_group_top8.csv\", index=False)\n",
    "historical_record_group.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import datetime\n",
    "import numpy as np\n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "alg = LinearRegression()\n",
    "alg.fit(np.array(result_all['净胜球']).reshape(-1, 1), np.array(result_all['真实净胜球']).reshape(-1, 1))\n",
    "\n",
    "def sigmoid(inX):  \n",
    "    return 1.0/(1+np.exp(-inX))  \n",
    "\n",
    "def goal_fiff(team1, team2, competition_time):\n",
    "    #historical_record = pd.read_csv(r\"D:\\worldcup\\historical_record.csv\")\n",
    "    historical_record = pd.read_csv(r\"D:\\worldcup\\historical_record.csv\")\n",
    "    del historical_record['id']\n",
    "    del historical_record['create_time']\n",
    "    del historical_record['update_time']\n",
    "    #去重\n",
    "    historical_record = historical_record.drop_duplicates().reset_index(drop = True)\n",
    "    #处理result为净胜球    \n",
    "    for i in range(len(historical_record)):\n",
    "        num1 = historical_record.loc[i, 'result'].split('-')[0]\n",
    "        num2 = historical_record.loc[i, 'result'].split('-')[1]\n",
    "        if historical_record.loc[i, 'home_team'] == historical_record.loc[i, 'team_name']:\n",
    "            historical_record.loc[i, 'result'] = int(num1) - int(num2)\n",
    "        else:\n",
    "            historical_record.loc[i, 'result'] = int(num2) - int(num1)\n",
    "    #选出team1和team2\n",
    "    historical_record_1 = historical_record.loc[historical_record[\"team_name\"] == team1]\n",
    "    historical_record_2 = historical_record.loc[historical_record[\"team_name\"] == team2]\n",
    "    e_df = set(historical_record_1['home_team'].tolist()).union(set(historical_record_1['visiting_team'].tolist()))\n",
    "    s_df = set(historical_record_2['home_team'].tolist()).union(set(historical_record_2['visiting_team'].tolist()))\n",
    "    e_union_s = e_df.intersection(s_df)\n",
    "    #print(e_union_s)\n",
    "    #选出即和team1交手又和team2交手的队伍\n",
    "    int_inf_2 = historical_record_2.loc[historical_record_2[\"visiting_team\"].isin(e_union_s) | historical_record_2[\"home_team\"].isin(e_union_s)]\n",
    "    int_inf_1 = historical_record_1.loc[historical_record_1[\"visiting_team\"].isin(e_union_s) | historical_record_1[\"home_team\"].isin(e_union_s)]\n",
    "    concat_e_s = pd.concat([int_inf_1, int_inf_2]).reset_index(drop=True)  \n",
    "    \n",
    "    #print(e_df)\n",
    "    #设置比赛开始时间\n",
    "    concat_e_s_sle = concat_e_s.loc[: , ['team_name', 'home_team', 'visiting_team', 'time', 'result', 'score']]\n",
    "    concat_e_s_sle['time'] = pd.to_datetime(concat_e_s_sle['time'])\n",
    "    start_date_str = competition_time\n",
    "    start_date = datetime.datetime.strptime(start_date_str, '%Y/%m/%d %H:%M')\n",
    "    #sigmode处理时间，得出权重\n",
    "    concat_e_s_sle['sec_from_start_to_data'] = (concat_e_s_sle.loc[:, 'time']-start_date).dt.total_seconds()  \n",
    "    concat_e_s_sle['sfstd_non'] = concat_e_s_sle.loc[:, ['sec_from_start_to_data']].apply(lambda x: (x - np.mean(x)) / (np.std(x)))\n",
    "\n",
    "    concat_e_s_sle['wight'] = sigmoid(concat_e_s_sle['sfstd_non'])\n",
    "    #净胜球与权重结合\n",
    "    concat_e_s_sle['result_wight'] = concat_e_s_sle['result'] * concat_e_s_sle['wight']\n",
    "    #计算结合平均值\n",
    "    union_1 = pd.DataFrame({'team_name':[],'oppose_team':[],'mean_result_1':[]})\n",
    "    union_2 = pd.DataFrame({'team_name':[],'oppose_team':[],'mean_result_2':[]})\n",
    "    for i in e_union_s:\n",
    "        if i != team1:\n",
    "            mean_1 = concat_e_s_sle.loc[(concat_e_s_sle['team_name'] == team1)&((concat_e_s_sle['home_team'] == i) | (concat_e_s_sle['visiting_team'] == i))].loc[:, 'result_wight'].mean()\n",
    "            union_1 = pd.concat([union_1, pd.DataFrame({'team_name':[team1],'oppose_team':[i],'mean_result_1':[mean_1]})])\n",
    "        if i != team2:\n",
    "            mean_2 = concat_e_s_sle.loc[(concat_e_s_sle['team_name'] == team2)&((concat_e_s_sle['home_team'] == i) | (concat_e_s_sle['visiting_team'] == i))].loc[:, 'result_wight'].mean()\n",
    "            union_2 = pd.concat([union_2, pd.DataFrame({'team_name':[team2],'oppose_team':[i],'mean_result_2':[mean_2]})])\n",
    "        \n",
    "        \n",
    "    union = union_1.merge(union_2, on = 'oppose_team')\n",
    "    #print(union)\n",
    "    \n",
    "    #team1与team2直接对抗结果\n",
    "    mean_1_2 = concat_e_s_sle.loc[(concat_e_s_sle['team_name'] == team1)&((concat_e_s_sle['home_team'] == team2) | (concat_e_s_sle['visiting_team'] == team2))].loc[:, 'result_wight'].mean()\n",
    "    op_1_2 = pd.DataFrame({'team_name':[team1],'oppose_team':[team2],'mean_result_1':[mean_1_2]})\n",
    "    mean_2_1 = concat_e_s_sle.loc[(concat_e_s_sle['team_name'] == team2)&((concat_e_s_sle['home_team'] == team1) | (concat_e_s_sle['visiting_team'] == team1))].loc[:, 'result_wight'].mean()\n",
    "    op_2_1 = pd.DataFrame({'team_name':[team2],'oppose_team':[team1],'mean_result_2':[mean_2_1]})\n",
    "    #合并所有\n",
    "    union_all = pd.concat([union, op_2_1, op_1_2]).fillna(0)\n",
    "    #print(pd.concat([union, op_2_1, op_1_2]).fillna(0))\n",
    "    \n",
    "    res = (union_all['mean_result_1'] - union_all['mean_result_2']).mean()\n",
    "    #修改\n",
    "    res = alg.predict(np.array(res).reshape(-1, 1))[0,0]\n",
    "    res_e_s = pd.DataFrame({'team1':[team1], 'team2':[team2], 'competition_time':[competition_time], '净胜球':[res]})\n",
    "    return res_e_s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>competition_time</th>\n",
       "      <th>team1</th>\n",
       "      <th>team2</th>\n",
       "      <th>净胜球</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018/7/6 22:00</td>\n",
       "      <td>乌拉圭</td>\n",
       "      <td>法国</td>\n",
       "      <td>-1.366176</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018/7/7 2:00</td>\n",
       "      <td>巴西</td>\n",
       "      <td>比利时</td>\n",
       "      <td>0.414957</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018/7/7 22:00</td>\n",
       "      <td>瑞典</td>\n",
       "      <td>英格兰</td>\n",
       "      <td>-0.084821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018/7/8 2:00</td>\n",
       "      <td>俄罗斯</td>\n",
       "      <td>克罗地亚</td>\n",
       "      <td>-0.662422</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  competition_time team1 team2       净胜球\n",
       "0   2018/7/6 22:00   乌拉圭    法国 -1.366176\n",
       "0    2018/7/7 2:00    巴西   比利时  0.414957\n",
       "0   2018/7/7 22:00    瑞典   英格兰 -0.084821\n",
       "0    2018/7/8 2:00   俄罗斯  克罗地亚 -0.662422"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "competition_process = pd.read_csv(r\"D:\\worldcup\\competition_process_4.csv\", encoding='gbk', names =['competition_time','team1', 'vs', 'team2'])\n",
    "competition_process['team1'] = [x.strip() for x in competition_process['team1']]\n",
    "competition_process['team2'] = [x.strip() for x in competition_process['team2']]\n",
    "del competition_process['vs']\n",
    "\n",
    "result = pd.DataFrame({'team1':[] , 'team2':[], 'competition_time':[], '净胜球':[]})\n",
    "for i in range(len(competition_process)):\n",
    "    result = pd.concat([result, goal_fiff(competition_process.loc[i, 'team1'], competition_process.loc[i, 'team2'], competition_process.loc[i, 'competition_time'])])\n",
    "    #print(i)\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
